package com.forensix.interface_test;

import com.fasterxml.jackson.databind.JsonNode;
import com.forensix.interface_test.utils.ResponseJsonNodeUtil;
import io.restassured.response.Response;
import org.testng.annotations.Test;


import static io.restassured.RestAssured.given;

public class GetWorkOrderTypeTest {

    @Test(priority = 2)
    public void test() {
        Response response = given().
                cookie("CRM-sid", "s%3ARncsVR3LaWYFMgwk3f-HSUhf61pKMp31.JVcCFK%2F%2BobRuRF88I7lI3QnMtIo9%2Bdtbv9NtRT%2Fn4I0")
                .when()
                .get("http://172.16.60.230/dictionary/workOrderType");

//        String resp = response.body().asString();

        System.out.println(response.body().asString());

//        JsonNode jsonNode = ResponseJsonNodeUtil.ResponseJsonNode(resp);
//        JsonNode value = jsonNode.get("count");
//
//        Assert.assertEquals(16, Integer.parseInt(String.valueOf(value)));
//        System.out.println(value);


    }

}
